
<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'js/utils.js,selectzone.js,colorselector.js')); ?>
<script type="text/javascript" src="js/calendar.php?lang=<?php echo $this->_var['cfg_lang']; ?>"></script>
<link href="js/calendar/calendar.css" rel="stylesheet" type="text/css" />

<?php if ($this->_var['warning']): ?>
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
  <li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" ><?php echo $this->_var['warning']; ?></li>
</ul>
<?php endif; ?>


<div class="tab-div">
    
    <div id="tabbar-div">
      <p>
        <span class="tab-front" id="general-tab"><?php echo $this->_var['lang']['tab_general']; ?></span><span
        class="tab-back" id="detail-tab"><?php echo $this->_var['lang']['tab_detail']; ?></span><span
        class="tab-back" id="mix-tab"><?php echo $this->_var['lang']['tab_mix']; ?></span><?php if ($this->_var['goods_type_list']): ?><span
        class="tab-back" id="properties-tab"><?php echo $this->_var['lang']['tab_properties']; ?></span><?php endif; ?><span
        class="tab-back" id="gallery-tab"><?php echo $this->_var['lang']['tab_gallery']; ?></span><span
        class="tab-back" id="linkgoods-tab"><?php echo $this->_var['lang']['tab_linkgoods']; ?></span><?php if ($this->_var['code'] == ''): ?><span
        class="tab-back" id="groupgoods-tab"><?php echo $this->_var['lang']['tab_groupgoods']; ?></span><?php endif; ?><span
        class="tab-back" id="article-tab"><?php echo $this->_var['lang']['tab_article']; ?></span>
      </p>
    </div>

    
    <div id="tabbody-div">
      <form enctype="multipart/form-data" action="projects.php?pid=<?php echo $this->_var['project']['pid']; ?>" method="post" name="theForm" onsubmit="return validate();">
        
        <input type="hidden" name="MAX_FILE_SIZE" value="2097152" />
        
        <table width="90%" id="general-table" align="center">
          <tr>
            <td class="label">Project Subject:</td>
            <td><input type="text" name="project_subject" value="<?php echo $this->_var['project']['subject']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" />
            </td>
          </tr>
          <tr>
            <td class="label">Project ID:</td>
            <td><?php echo $this->_var['project']['pid']; ?></td>
          </tr>
          <tr>
            <td class="label">Looking for</td>
            <td>
			<select id="trainertype_id" name="trainer_type">
			<?php $_from = $this->_var['trainertype']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'trainertype_0_51259900_1315870861');if (count($_from)):
    foreach ($_from AS $this->_var['trainertype_0_51259900_1315870861']):
?>
			<option value="<?php echo $this->_var['trainertype_0_51259900_1315870861']['num']; ?>"><?php echo $this->_var['trainertype_0_51259900_1315870861']['trainerType']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("trainertype_id").value="<?php echo $this->_var['project']['trainerType']; ?>";
			</script>
            </td>
          </tr>
		  <tr>
            <td class="label">Training type</td>
            <td><select id="trainingtype_id" name="training_type" >
			<?php $_from = $this->_var['trainingtype']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'trainingtype_0_51286500_1315870861');if (count($_from)):
    foreach ($_from AS $this->_var['trainingtype_0_51286500_1315870861']):
?>
			<option value="<?php echo $this->_var['trainingtype_0_51286500_1315870861']['num']; ?>"><?php echo $this->_var['trainingtype_0_51286500_1315870861']['trainingType']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("trainingtype_id").value="<?php echo $this->_var['project']['trainingType']; ?>";
			</script>
            </td>
          </tr>
		  <tr>
            <td class="label">How many training sessions</td>
            <td><select id="sessionstype_id" name="sessions_type">
			<?php $_from = $this->_var['sessionstype']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'sessionstype_0_51309600_1315870861');if (count($_from)):
    foreach ($_from AS $this->_var['sessionstype_0_51309600_1315870861']):
?>
			<option value="<?php echo $this->_var['sessionstype_0_51309600_1315870861']['num']; ?>"><?php echo $this->_var['sessionstype_0_51309600_1315870861']['sessionType']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("sessionstype_id").value="<?php echo $this->_var['project']['sessions']; ?>";
			</script>
            </td>
          </tr>
		  <tr>
            <td class="label">Length per session</td>
            <td><select id="sessionlength_id" name="session_length">
			<?php $_from = $this->_var['sessionlength']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'sessionlength_0_51335400_1315870861');if (count($_from)):
    foreach ($_from AS $this->_var['sessionlength_0_51335400_1315870861']):
?>
			<option value="<?php echo $this->_var['sessionlength_0_51335400_1315870861']['num']; ?>"><?php echo $this->_var['sessionlength_0_51335400_1315870861']['lengthType']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("sessionlength_id").value="<?php echo $this->_var['project']['length']; ?>";
			</script>
            </td>
          </tr>
		  <tr>
            <td class="label">Training budget</td>
            <td><select id="budget_id" name="budget">
			<?php $_from = $this->_var['budget']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'budget_0_51361600_1315870861');if (count($_from)):
    foreach ($_from AS $this->_var['budget_0_51361600_1315870861']):
?>
			<option value="<?php echo $this->_var['budget_0_51361600_1315870861']['num']; ?>"><?php echo $this->_var['budget_0_51361600_1315870861']['budgetType']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("budget_id").value="<?php echo $this->_var['project']['budget']; ?>";
			</script>
            </td>
          </tr>
		  <tr>
            <td class="label">Quoting closes</td>
            <td><select id="quoting_id" name="quoting">
			<?php $_from = $this->_var['quoting']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'quoting_0_51384700_1315870861');if (count($_from)):
    foreach ($_from AS $this->_var['quoting_0_51384700_1315870861']):
?>
			<option value="<?php echo $this->_var['quoting_0_51384700_1315870861']['num']; ?>"><?php echo $this->_var['quoting_0_51384700_1315870861']['quotingType']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("quoting_id").value="<?php echo $this->_var['project']['quoting']; ?>";
			</script>
            </td>
          </tr>
		  <tr>
            <td class="label">City/Town</td>
            <td><input type="text" name="city_town" value="<?php echo $this->_var['project']['city']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" /></td>
          </tr>
		  <tr>
            <td class="label">How many friends do you intend to bring</td>
            <td><select id="friends_id" name="friends_num">
			<?php $_from = $this->_var['friendsnum']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'friend');if (count($_from)):
    foreach ($_from AS $this->_var['friend']):
?>
			<option value="<?php echo $this->_var['friend']['num']; ?>"><?php echo $this->_var['friend']['friendsnum']; ?></option>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</select>
			<script>
				document.getElementById("friends_id").value="<?php echo $this->_var['project']['friends']; ?>";
			</script>
            </td>
          </tr>
          <tr>
            <td class="label">Details about your training goals</td>
            <td><input type="text" name="project_detail" value="<?php echo $this->_var['project']['content']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" />
            </td>
          </tr>
		  <tr>
            <td class="label">Created Date</td>
            <td><input type="text" name="create_date" value="<?php echo $this->_var['project']['createdDate']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" />
            </td>
          </tr>
		  <tr>
            <td class="label">End Date</td>
            <td><?php echo $this->_var['project']['endDate']; ?>
            </td>
          </tr>
		  <tr>
            <td class="label">Special Request</td>
            <td><input type="text" name="special_request" value="<?php echo $this->_var['project']['specialReq']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" />
            </td>
          </tr>
		  <tr>
            <td class="label">Applied for Feature or Not</td>
            <td>
			<input type="radio" name="feature_flag" value="0" />Not			
			<input type="radio" name="feature_flag" value="1" />Applied	
			<script>					
    			if(document.getElementsByName("feature_flag")[0].value == <?php echo $this->_var['project']['featuredFlag']; ?>)
				{
					document.getElementsByName("feature_flag")[0].checked = true;  
				}
				else
				{
					document.getElementsByName("feature_flag")[1].checked = true; 
				}
       					
			</script>		
            </td>
          </tr>
		  <tr>
            <td class="label">Feature Date</td>
            <td><input type="text" name="feature_date" value="<?php echo $this->_var['project']['featuredDate']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" /><input type="hidden" id="goods_name_color" name="goods_name_color" value="<?php echo $this->_var['goods_name_color']; ?>" />&nbsp;
            </td>
          </tr>
		  <tr>
            <td class="label">Proposals Number</td>
            <td><input type="text" name="proposals_num" value="<?php echo $this->_var['project']['proposalsNum']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" /><input type="hidden" id="goods_name_color" name="goods_name_color" value="<?php echo $this->_var['goods_name_color']; ?>" />&nbsp;
            </td>
          </tr>
		  <tr>
            <td class="label">Status</td>
            <td><input type="text" name="project_status" value="<?php echo $this->_var['project']['status']; ?>" style="float:left;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" /><input type="hidden" id="goods_name_color" name="goods_name_color" value="<?php echo $this->_var['goods_name_color']; ?>" />&nbsp;
            </td>
          </tr>
        </table>

        <div class="button-div">
          <input type="submit" value="Save Changes" class="button" />
        </div>
        <input type="hidden" name="act" value="modify" />
      </form>
    </div>
</div>

<?php echo $this->fetch('pagefooter.htm'); ?>
